﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeFile="Linh_kien.aspx.cs" Inherits="ChucNang_Ban_giao_thiet_bi" %>

<%@ Register Assembly="eWorld.UI" Namespace="eWorld.UI" TagPrefix="ew" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        .cssTextBox
        {
        }
        .style4
        {
            width: 183px;
        }
        .style5
        {
            height: 26px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <table cellspacing="0" cellpadding="2" style="width: 100%;" class="cssTable" border="0">
        <tr>
            <td class="cssPageTitleBG" colspan="4">
                <asp:Label ID="lbl_thong_tin_chi_tiet_tv" runat="server" CssClass="cssPageTitle"
                    Text="Thông tin linh kiện" />
            </td>
        </tr>
        <asp:HiddenField ID="hdf_id_ban_giao_thiet_bi" runat="server" />
        <tr>
            <td align="right" class="style4">
                <asp:Label ID="Label26" CssClass="cssManField" runat="server" 
                    Text="Chọn linh kiện" />
            </td>

            <td>
                <asp:DropDownList ID="m_cbo_linh_kien" runat="server" Width="400px">
                </asp:DropDownList>
            </td>
            <td align="right" class="style2">
                <asp:Label ID="Label27" CssClass="cssManField" runat="server" 
                    Text="SN cũ" />
            </td>
            <td>
                <asp:TextBox ID="m_txt_sn_cu" CssClass="cssTextBox" runat="server" Width="400px"
                    ReadOnly="True" />
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                    ControlToValidate="m_txt_sn_cu" ErrorMessage="(*)"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td align="right" class="style4">
                <asp:Label ID="Label28" CssClass="cssManField" runat="server" 
                    Text="SN mới" />
            </td>
            <td>
                <asp:TextBox ID="m_txt_sn_moi" CssClass="cssTextBox" runat="server" Width="400px"
                    ReadOnly="True" />
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                    ControlToValidate="m_txt_sn_moi" ErrorMessage="(*)"></asp:RequiredFieldValidator>
            </td>
            <td align="right" class="style2">
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td colspan="4" align="center" class="style5">
                <asp:Button ID="m_btn_them_linh_kien_moi" AccessKey="v" CssClass="cssButton" runat="server"
                    Width="150px" Text="Thêm linh kiện mới" Height="22px" 
                    onclick="m_btn_them_linh_kien_moi_Click" />&nbsp;&nbsp;&nbsp;&nbsp;
                &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;
                <asp:Button ID="m_btn_tiep_tuc" AccessKey="x" CssClass="cssButton" runat="server"
                    Width="150px" Text="Tiếp tục" Height="22px" 
                    onclick="m_btn_tiep_tuc_Click" />&nbsp;&nbsp;&nbsp;&nbsp;
                &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;
                </td>
        </tr>
        <tr>
            <td class="cssPageTitleBG" colspan="4">
                <asp:Label ID="v_lbl_nhan_loc_doi_tac" runat="server" Text="Danh sách linh kiện"
                    CssClass="cssPageTitle" />
            </td>
        </tr>
        
        <!-- Lưới dữ liệu -->
        <tr>
            <td align="center" colspan="4" valign="top">
                <asp:GridView ID="m_grv_dm_linh_kien" runat="server" CellPadding="4" AutoGenerateColumns="False"
                    Width="98%" BackColor="White" BorderColor="#3366CC" BorderStyle="None" BorderWidth="1px"
                    DataKeyNames="ID">
                    <Columns>
                        <asp:TemplateField HeaderText="STT">
                            <ItemTemplate>
                                <%# Container.DataItemIndex + 1 %>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="TEN_NGAN" HeaderText="Tên linh kiện" />
                        <asp:BoundField DataField="SN_CU" HeaderText="SN cũ" />
                        <asp:BoundField DataField="SN_MOI" HeaderText="SN mới" />
                        <asp:TemplateField HeaderText="Xem chi tiết">
                            <ItemTemplate>
                                <asp:LinkButton runat="server" ID="m_lbt_chi_tiet" CommandName="Update" ToolTip="Sửa"
                                    CausesValidation="false"><center><img src="../Images/Button/edit.png" width="20px" height="20px" alt="Sửa" /></center></asp:LinkButton>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Xóa">
                            <ItemTemplate>
                                <asp:LinkButton runat="server" ID="m_lbt_xoa" CommandName="Delete" OnClientClick="return confirm ('Các dữ liệu liên quan cũng sẽ bị xóa. Bạn có thực sự muốn xóa ?')"
                                    ToolTip="Xóa dự án này" CausesValidation="false"><center><img src="../Images/Button/deletered.png" width="20px" height="20px" alt="Xóa" /></center></asp:LinkButton>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <FooterStyle BackColor="#99CCCC" ForeColor="#003399" />
                    <HeaderStyle BackColor="#003399" Font-Bold="True" ForeColor="#CCCCFF" />
                    <PagerStyle BackColor="#99CCCC" ForeColor="#003399" HorizontalAlign="Left" />
                    <RowStyle BackColor="White" ForeColor="#003399" />
                    <SelectedRowStyle BackColor="#009999" Font-Bold="True" ForeColor="#CCFF99" />
                    <SortedAscendingCellStyle BackColor="#EDF6F6" />
                    <SortedAscendingHeaderStyle BackColor="#0D4AC4" />
                    <SortedDescendingCellStyle BackColor="#D6DFDF" />
                    <SortedDescendingHeaderStyle BackColor="#002876" />
                </asp:GridView>
            </td>
        </tr>
    </table>
</asp:Content>
